package com.dao.basic.support;

import java.io.Serializable;
import java.util.List;

import com.dao.basic.ISALMDao;
import com.dao.spring.BaseDao;
import com.pojo.basic.SALM;

public class SALMDao extends BaseDao implements ISALMDao{

	@SuppressWarnings("unchecked")
	public List<SALM> findAllSALM() {
		return super.getHibernateTemplate().find("from SALM");
	}

	@SuppressWarnings("unchecked")
	public List<SALM> searchAllSALM(String dept, String keyword) {
		return super.getHibernateTemplate().find("from SALM as salm  where salm.DEP.DEP='"+dept+"' or salm.NAME='%"+keyword+"%' or salm.POS='%"+keyword+"%'");
	}

	public SALM get(Serializable id) {
		return super.getHibernateTemplate().get(SALM.class, id);
	}

}
